package com.shxzz.easy12306.services.user.dto.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.shxzz.easy12306.services.user.serialize.IdCardDesensitizationSerializer;
import com.shxzz.easy12306.services.user.serialize.LongNumberSerializer;
import com.shxzz.easy12306.services.user.serialize.PhoneDesensitizationSerializer;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 乘车人脱敏信息
 */
@Data
public class PassengerRespDTO {
    /**
     * ID
     */
    @JsonSerialize(using = LongNumberSerializer.class)
    private Long id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 乘客真实姓名
     */
    private String realName;

    /**
     * 乘客手机号
     */
    @JsonSerialize(using = PhoneDesensitizationSerializer.class)
    private String phone;

    /**
     * 乘客证件类型
     */
    private Integer idType;

    /**
     * 乘客证件号
     */
    @JsonSerialize(using = IdCardDesensitizationSerializer.class)
    private String idCard;

    /**
     * 优惠类型
     */
    private Integer discountType;

    /**
     * 添加日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime createDate;
}